package com.administrator.cloudapplication.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2017/4/17.
 */

public class MediaAdapter extends FragmentPagerAdapter {
    List<Fragment> mFagmentList;
    String [] tab_title={"视频教学","有声读物","电子书"};
    public MediaAdapter(FragmentManager fm, List<Fragment> fagmentList) {
        super(fm);
        mFagmentList = fagmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return mFagmentList.get(position);
    }

    @Override
    public int getCount() {
        return mFagmentList.size();
    }
    public CharSequence getPageTitle(int position) {
        return tab_title[position];
    }
}
